/**
 * Classname: problem1_Garg
 * 
 * Version: 1.1
 *
 * Date: 03/10/2009
 * 
 * Author: Dilip Garg
 */

import java.util.Scanner;

/**
 * This class reads the given integer in the range 1 to 10, from the standard input
 * and computes its factorial, and writes the computed factorial on standard output.
 *
 * Usage: Factorial < input.txt > output.txt
 */

public class problem1_Garg
{
	protected int n;
	
	/**
	 * Base Constructor
	 */
	public problem1_Garg()
	{
		n = 0;
	}
	
	public static void main(String[] args)
	{
		// Read from standard input
		Scanner sc = new Scanner (System.in);
		int input = sc.nextInt();
		
		// Compute the factorial
		int answer = computeFactorial(input);
		
		// Writes the answer onto standard output
		System.out.print(answer + "\n");
	}
	
	/**
	 * This method uses recursion to calculate the factorial,
	 * 
	 * @arg n input number
	 * @return computed factorial 
	 */
	public static int computeFactorial (int n)
	{
		if (n == 1)
			return n;
		else 
			return (n * computeFactorial(n - 1));
	}
}
